<template>
    <div class="userCenter">
        <div class="logo">
            <canvas class="rayBox" id="canvas" width="89px" height="88px"></canvas>
            
        </div>
        <div class="user userName">
            <ul>
                <li><span>用户名称：</span><span class="yellwo spanRight">{{init.personal.name}}</span></li>
                <li><span>账户余额：</span><span class="red spanRight">{{init.personal.money}}</span></li>
            </ul>
        </div>
        <div class="user userGameDiv">
            <ul>
                <li><span>桌台编号：</span><span class="yellwo spanRight"><p class="roomName" >{{init.Room.nember}}</p></span></li>
                <li><span>游戏局号：</span><span class="yellwo spanRight">{{init.Room.gameNum}}</span></li>
                <li><span>房间限红：</span><span class="yellwo spanRight">{{init.Room.gameRedTop}}</span></li>
                <li><span>个人限红：</span><span class="yellwo spanRight">{{init.Room.personalRedTop}}</span></li>
                <li><span>下注总额：</span><span class="yellwo spanRight">{{init.Room.personalDownMoney}}</span></li>
                <li><span>在线人数：</span><span class="yellwo spanRight">{{init.Room.onLine}}</span></li>
            </ul>
        </div>
        <div class="user userFooler">
            <ul>
                <li><span>庄：</span><span class="yellwo spanRight">{{init.Room.z}}</span></li>
                <li><span>闲：</span><span class="yellwo spanRight">{{init.Room.h}}</span></li>
                <li><span>和：</span><span class="yellwo spanRight">{{init.Room.he}}</span></li>
                <li><span>庄对：</span><span class="yellwo spanRight">{{init.Room.z2}}</span></li>
                <li><span>闲对：</span><span class="yellwo spanRight">{{init.Room.h2}}</span></li>
            </ul>
        </div>
    </div>
</template>
<script>

export default {
    name:"userCenter",
    data(){
        return {
             init: {
            personal: {
                name: "DDD1号",
                money: 12000
            },
            Room: {
                nember: "百家乐A1",
                gameNum: "GCS15200",
                gameRedTop: "20-6000",
                personalRedTop: "500",
                personalDownMoney: 0,
                onLine: 988,
                z: 0,
                h: 0,
                he: 0,
                z2: 0,
                h2: 0,
                videoBox: {
                    one: true,
                    two: true
                },
                Player: {},
                sonRooom: {
                    "迪威一厅": [
                        { id: 1, time: 30 },
                        { id: 2, time: 45 },
                        { id: 3, time: 25 },
                        { id: 4, time: 18 },
                        { id: 5, time: 50 },
                        { id: 6, time: 30 },
                        { id: 7, time: 30 },
                        { id: 8, time: 30 },
                        { id: 9, time: 12 },
                        { id: 10, time: 50 },
                        { id: 11, time: 55 },
                        { id: 12, time: 60 },
                        { id: 13, time: 9 },
                        { id: 14, time: 12 },
                        { id: 15, time: 17 },
                        { id: 16, time: 60 },
                        { id: 17, time: 5 },
                        { id: 18, time: 19 },
                        { id: 19, time: 48 },
                        { id: 20, time: 30 },
                        { id: 21, time: 30 },
                        { id: 22, time: 60 },
                        { id: 23, time: 52 },
                        { id: 24, time: 48 },
                        { id: 25, time: 37 },
                        { id: 26, time: 34 },
                        { id: 27, time: 46 },
                        { id: 28, time: 50 },
                        { id: 29, time: 52 },
                        { id: 30, time: 51 },
                    ],
                    "迪威二厅": [
                        { id: 1, time: 30 },
                        { id: 2, time: 45 },
                        { id: 3, time: 25 },
                        { id: 4, time: 18 },
                        { id: 5, time: 50 },
                        { id: 6, time: 30 },
                        { id: 7, time: 30 },
                        { id: 8, time: 30 },
                        { id: 9, time: 12 },
                    ]
                }
            }
        },
        }
    },
    mounted(){
        var _this = this;
        // LOGO照光图
        var canvsRun = function () {
            var canvas = document.getElementById("canvas").getContext("2d");
            var img = new Image();
            img.src = "";
            img.onload = function () {
                canvas.drawImage(img, -90, 0);
                var xx = 0;
                setInterval(function () {
                    if (xx > 90) {
                        xx = -90;
                    }
                    else {
                        xx++;
                    }
                    canvas.clearRect(0, 0, 140, 140);
                    canvas.drawImage(img, xx, 0);
                }, 10);
            };
        };
         canvsRun();
    }
    
}
</script>
<style>
    .userCenter{
        height: 100%;
    }
</style>


